// pages/toolList/toolList.js
Page({

  data: {
    tool_list: [],
  },

  onLoad: function () {
    // All urls should be identical with those in app.json
    this.setData({
      tool_list: [{
        index: 1,
        title: "点击型计数器",
        url: "pages/tools/counter/counter"
      }, {
        index: 2,
        title: "统计计算器",
        url: "pages/tools/statistical-calculator/statistical-calculator",
      }, {
        index: 3,
        title: "万能表达式计算器",
        url: "pages/tools/expression-calculator/expression-calculator",
      }],
    });
  },

  onShareAppMessage: function (res) {
    return {
      title: '快来看看学长开发的万能基物实验小程序！',
      path: 'pages/index/index',
      imageUrl: 'https://s1.ax1x.com/2020/07/25/aSICY4.jpg',
      success: function (res) {
        console.log('成功分享', res)
      }
    }
  },

  navTo: function(e) {
    wx.navigateTo({
      url: `../../${e.currentTarget.dataset.exp.url}`,
    })
  }
})